{% extends "base.html" %}
{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% load django_bootstrap5 %}
{% block title %}Request publication for {{ doc }}{% endblock %}
{% block content %}
    {% origin %}
    <h1>
        Request publication
        <br>
        <small class="text-body-secondary">{{ doc }}</small>
    </h1>
    <p class="my-3 alert alert-info">
        Send a publication request to the RFC Editor for {{ doc }} and move it to the <i>{{ next_state.name }}</i> stream state.
        Please edit the message and remove any parts in brackets you do not
        fill in. For independent submissions, see the
        <a href="https://www.rfc-editor.org/indsubs.html">guidelines</a>.
    </p>
    {% if not doc.intended_std_level %}
        <p class="alert alert-warning my-3">
            <b>Note:</b> Intended RFC status is not set for the document.
        </p>
    {% endif %}
    {% if doc.stream_id != "ise" and not consensus_filled_in %}
        <p class="alert alert-warning my-3">
            <b>Note:</b> Consensus status is not set for the document.
        </p>
    {% endif %}
    <form class="mt-3" method="post">
        {% csrf_token %}
        <div class="mb-3">
            <label for="message-frm" class="form-label">From</label>
            <input class="form-control"
                   type="text"
                   id="message-frm"
                   value="{{ message.frm }}"
                   readonly>
        </div>
        <div class="mb-3">
            <label for="message-to" class="form-label">To</label>
            <input class="form-control"
                   type="text"
                   id="message-to"
                   value="{{ message.to }}"
                   readonly>
        </div>
        {% if message.cc %}
            <div class="mb-3">
                <label for="message-cc" class="form-label">Cc</label>
                <input class="form-control"
                       type="text"
                       id="message-cc"
                       value="{{ message.cc }}"
                       readonly>
            </div>
        {% endif %}
        {% bootstrap_form form %}
        <button type="submit" class="btn btn-primary">Email RFC Editor</button>
        <button type="reset" class="btn btn-warning">Reset</button>
        <a class="btn btn-secondary float-end"
           href="{% url "ietf.doc.views_doc.document_main" name=doc.name %}">Back</a>
    </form>
{% endblock %}